home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / emerald / emrldsys.lha / Language / ExecTests / tinstream.m < prev    next >
Encoding:
Text File  |  1990-08-31  |  499 b   |  17 lines

  1. import runtest from "RunTest"
  2.  
  3. const tinstream <- object tinstream
  4.   const myTest == runtest.create[stdin, stdout, "tinstream"]
  5.   process
  6.     % each test looks like myTest.check[<boolean expression>, "<same exp>"]
  7.     var c : Character
  8.     var s : String
  9.     c <- stdin.getChar
  10.     myTest.check[c = 'T', "c = 'T'"]
  11.     stdin.unGetChar[c]
  12.     s <- stdin.getString
  13.     myTest.check[s = "This is a line of stuff.\^J", "s = \"This is a line of stuff.\\^J\""]
  14.     myTest.done
  15.   end process
  16. end tinstream
  17.